{var nav=document.querySelector('nav')
var guanBi=document.querySelector('.guanBi')
var nav_li =document.querySelectorAll('.nav_box li')
var zhineng_erji=document.querySelector('.zhineng_erji')
var zhineng_erji_All=document.querySelectorAll('.zhineng_erji div')
var nav_li_a =document.querySelectorAll('.nav_box li a')
var header_mengceng=document.querySelector('.header_mengceng')
var erjiZuoBian=document.querySelectorAll('.erjiZuoBian li')
var erjiYouBian=document.querySelectorAll('.erjiYouBian ul')
var erji_1tu=document.querySelector('.erji_1tu')
var gouzi=document.querySelector('.gouzi')
var mao=document.querySelector('.mao')
var mao1=document.querySelector('.mao1')
var mao2=document.querySelector('.mao2')
var jiantou=document.querySelectorAll('.erjiZuoBian li b')
var ha=document.querySelector('.fuzhu')}
//注册事件，当鼠标点击 nav_li 二级显示
//——————————————————————————————控制二级————————————————————————————
nav_li.forEach(function(a,b){
    //这里把斜杠删除
a.onmouseover/=function(){
    for(var i=0;i<zhineng_erji_All.length;i++){
        zhineng_erji_All[i].className='off'
    }
    zhineng_erji.style.height='660px'
    this.style.backgroundColor='black'
    nav_li_a[b].style.color='white'
    header_mengceng.style.backgroundColor='rgba(0, 0, 0, .5)'
    zhineng_erji_All[b].className='' 
}
a.onmouseout=function(){
    //zhineng_erji.style.height='0px'
    this.style.backgroundColor=''
    nav_li_a[b].style.color='black'
  
}

// ——————————————————————————控制二级的开关————————————————————————————————
guanBi.onclick=function(){
for(var i=0;i<zhineng_erji_All.length;i++){
        zhineng_erji_All[i].className='off'
    }
zhineng_erji.style.height='0px'
header_mengceng.style.backgroundColor=''
}
})
// ——————————————————————————控制三级——————————————————————————————————————
erjiZuoBian.forEach(function(a,b){
   a.onmouseover=function(){
     
       for(i=0;i<erjiZuoBian.length;i++){
        erjiYouBian[i].className='off'
        //jiantou[i].style.display='none'
       }
       erjiZuoBian[b].style.fontWeight='bold'
       erjiYouBian[b].className=''
       jiantou[b].style.display='flex'
   }
   a.onmouseout=function(){
    erjiZuoBian[b].style.fontWeight=''
    //jiantou[b].className=''
    jiantou[b].style.display='none'
   }
})
erji_1tu.onmouseover=function(){
   erji_1tu.style.width='370px'
}
erji_1tu.onmouseout=function(){
   erji_1tu.style.width='350px'
}
var fun=function(a){
a.onmouseover=function(){
   this.style.width='370px'
}
a.onmouseout=function(){
   this.style.width='350px'
}
}
fun(gouzi);fun(mao);fun(mao1);fun(mao2);